﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZLCMS.Business.DwzFrame;
using DotNet.Common.Command;
using ZLCMS.Commands.Sys.Commands.RightInfo;

namespace ZLCMS.Web.SystemManage.Basics.RightConfig.Right
{
    public partial class FlushRight : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            FrameHelper framePage = new FrameHelper(this);
            string group = Request["group"];
            if (!string.IsNullOrEmpty(group))
            {
                ICommandResult<FlushRightResult> result = new FlushRightCommand().Execute(new FlushRightParameter() { GroupCode = group });

                framePage.Alert(new ReturnCode()
                {
                    statusCode = result.Error ? 300 : 200,
                    message = result.ErrorMsg,
                    navTabId = framePage.NavTabId
                });
            }
            else
            {
                framePage.Alert(new ReturnCode() { statusCode = 300, message = "参数错误" });
            }
        }
    }
}
